package com.yourcompany.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("credit_pay")
@Schema(description = "先充后付")
public class CreditPay extends BaseEntity {
    
    @Schema(description = "用户ID")
    private Long userId;
    
    @Schema(description = "信用额度")
    private BigDecimal creditLimit;
    
    @Schema(description = "已用额度")
    private BigDecimal usedCredit;
    
    @Schema(description = "可用额度")
    private BigDecimal availableCredit;
    
    @Schema(description = "信用分")
    private Integer creditScore;
    
    @Schema(description = "状态：0-未开通 1-正常 2-冻结")
    private Integer status;
    
    @Schema(description = "开通时间")
    private LocalDateTime activateTime;
    
    @Schema(description = "最近还款时间")
    private LocalDateTime lastRepayTime;
    
    @Schema(description = "下次还款时间")
    private LocalDateTime nextRepayTime;
} 